package com.hk.commons.poi.excel.read.listeners;


import com.hk.commons.poi.excel.metadata.Title;
import lombok.extern.slf4j.Slf4j;

import java.util.List;


/**
 * @param <T>
 * @author Kevin
 */
@Slf4j
public record SampleReadListener<T>() implements ReadListener<T> {

    @Override
    public void onSheetStart(int sheetIndex, String sheetName, int totalRow) {
        log.debug("start sheet: index:{},sheetName:{},totalRow:{}", sheetIndex, sheetName, totalRow);
    }

    @Override
    public void onRowStart(int sheetIndex, String sheetName, int row) {
        log.debug("start sheet row: index:{},sheetName:{},row:{}", sheetIndex, sheetName, row);
    }

    @Override
    public void onRowEnd(int sheetIndex, String sheetName, int row, T data, List<Title> titleList) {
        log.debug("end sheet row: index:{},sheetName:{},row:{}", sheetIndex, sheetName, row);
    }

    @Override
    public void onSheetEnd(int sheetIndex, String sheetName) {
        log.debug("end sheet: index:{},sheetName:{}", sheetIndex, sheetName);
    }
}
